#import "NSArray+Log.h"

@implementation NSArray (Log)

- (NSString *)descriptionWithLocale:(id)locale
{
    NSMutableString *strM = [NSMutableString stringWithString:@"(\n"];
    
    [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        [strM appendFormat:@"\t%@,\n", obj];
    }];
    
    [strM appendString:@")"];
    
    return strM;
}

@end

@implementation NSDictionary (Log)

- (NSString *)descriptionWithLocale:(id)locale
{
    NSMutableString *strM = [NSMutableString stringWithString:@"{\n"];
    
    [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
        [strM appendFormat:@"\t%@ = %@;\n", key, obj];
    }];
    
    [strM appendString:@"}\n"];
    
    return strM;
}

//没添加分类之前，
/*    "<News: \U7236\U7c7b:NSObject 0x7f8eb3e52610> {\n    digest = \"\";\n    imgsrc = \"http://img5.cache.netease.com/3g/2015/7/15/20150715153953cf905.jpg\";\n    replyCount = 4280;\n    title = \"\\U5370\\U5c0f\\U5929\\U5a5a\\U7eb1\\U7167\\U66dd\\U5149 \\U4e0b\\U6708\\U529e\\U5a5a\\U793c\";\n}"
*/

//添加分类之后
/*
 <News: 父类:NSObject 0x7f9813c77f80> {
	title = 印小天婚纱照曝光 下月办婚礼;
	digest = ;
	replyCount = 4415;
	imgsrc = http://img5.cache.netease.com/3g/2015/7/15/20150715153953cf905.jpg;
 }
*/


@end